package com.staticpackage;

public class StaicDemo {

	static  {
		System.out.println("static block called..");
		x=2000;
	 }

	static int x;
	public StaicDemo() {
		
		this.x++;    //StaicDemo.x++;
	}

 static 	void run(){
		System.out.println("in run"+StaicDemo.x);
	}
	
	void run2(){
		System.out.println("in run"+StaicDemo.x);
		run();
	}
	
	public static void main(String[] args) {
		System.out.println("In run");
		
		 StaicDemo.run();
		StaicDemo demo=new StaicDemo();
		StaicDemo demo1=new StaicDemo();
		StaicDemo demo2=new StaicDemo();
		StaicDemo demo3=new StaicDemo();
	
		System.out.println(StaicDemo.x);
		System.out.println(StaicDemo.x);
		System.out.println(demo2.x);
		System.out.println(demo3.x);
        Viabhav.out.print("pringgggggggggggggggggggg");
	}

}
